<?php /*a:1:{s:65:"D:\WAMP\wamp64\www\jj\application\index\view\login\login_page.php";i:1551146985;}*/ ?>
<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <title>网站官网</title>
        <meta name="keywords" content="关键字">
        <meta name="description" content="描述">
        <meta content="telephone=no" name="format-detection">
        <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
        <link rel="stylesheet" href="/pc/css/base.css">
        <link rel="stylesheet" href="/pc/css/login.css" />
        <script src="/pc/js/jquery.1.8.3.min.js"></script>
        <script src="/pc/js/echarts.min.js"></script>
        <script  src="/plugin/layer3/layer.js"></script>

    </head>

    <body>
    <div id="wrapper">
        <style> #wrapper {
                height: 100%;
                padding: 0;
            }
        </style>
        <div class="loginContainer">
            <div class="loginBox">
                <h2 class="h2loginTitle"><a href="/" class="loginTitle"></a></h2>
                <h2 class="loginTitle2">成就下一个网红的你</h2>
                <div class="loginFormBox">
                    <div class="btn"><a href="#" class="login">登录</a><a href="/login/register_page" class="register1">注册</a></div>
                    <form action="#" class="loginForm">
                        <input type="text" placeholder="请输入手机号" id="loginphone" class="tel">
                        <input type="password" placeholder="请输入密码" id="loginpwd" class="pwd">
                        <div class="checkBox clear">
                            <input type="checkbox" id="nextlogin" class="fl cb"><span class="loginAuto fl">下次自动登录</span><a href="<?php echo url('setnewpwd/findpwd1')?>" class="fr forgetPwd">忘记密码？</a>
                        </div>
                        <input type="button" id="login" value="登录" class="loginInput">
                    </form>
                </div>
            </div>
        </div>
    </div>
    </body>
</html>
<script>
    //登录
    $("#login").click(function () {
        var mobile=$("#loginphone").val();//登录的账号
        var password=$("#loginpwd").val();//登录的密码
        if (mobile==""){
            layer.msg('请输入手机号')
            return false;
        }
        var phoneReg = /1[3578]{1}\d{9}$/;
        if (!phoneReg.test(mobile)) {
            layer.msg('请输入正确的手机号')
            return false;
        };
        if (password==""){
            layer.msg('密码不能为空');
            return false;
        }
        if ($("#nextlogin").is(":checked")){
            var state=1;
        }else {
            var state=0;
        }

        $.post("<?php echo url('login/index')?>",{mobile:mobile,password:password,state:state},function (data) {

            if (data['status']!=1){
                layer.msg(data['data']);
                return false;
            }else {
                layer.msg(data['data'])
                setTimeout(function () {
                    window.location.href='/user/order'
                },1000);
            }
        },'json')
    })
</script>